from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
browser = webdriver.Chrome(options=chrome_options)
browser.get('https://www.baidu.com/')
html_code = browser.page_source
print(html_code)
browser.quit()
